package thread;

public class PriorityDemo {
    public static void main(String[] args){
        Thread max = new Thread(){
            @Override
            public void run(){
                for (int i = 0; i < 100000; i++) {
                    System.out.println("max");
                }
            }
        };
        Thread min = new Thread(){
            @Override
            public void run(){
                for (int i = 0; i < 100000; i++) {
                    System.out.println("min");
                }
            }
        };
        Thread norm = new Thread(){
            @Override
            public void run(){
                for (int i = 0; i < 100000; i++) {
                    System.out.println("norm");
                }
            }
        };
        max.setPriority(Thread.MAX_PRIORITY);
        min.setPriority(Thread.MIN_PRIORITY);
        max.run();
        min.run();
        norm.run();
    }
}




